package com.ruoyi.yljf.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.yljf.domain.CoursePackage;
import com.ruoyi.yljf.domain.vo.CoursePackagePracticeVO;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 课程目录Mapper接口
 * 
 * @author metaee
 * @date 2025-03-06
 */
public interface CoursePackageMapper extends BaseMapper<CoursePackage> {

    @Select("select distinct sections,sort from yljf_course_package where course_id = #{courseId} ORDER BY sort ASC")
    List<String> distinctBySections(Long courseId);

    @Select("select id,name,practice_count from yljf_course_package WHERE course_id = #{courseId}")
    List<CoursePackagePracticeVO> selectByCourseID(Long courseId);
}
